/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.beautycenter.DAO;

import br.com.beautycenter.bean.ExameFisico;
import br.com.beautycenter.hibernateUtil.DaoBase;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Magelinha
 */
public class PersisteExameFisico extends DaoBase<ExameFisico> { 
    public List<ExameFisico> retornarExames(){
        try {
            return findAll();
        } catch (Exception ex) {
            return new ArrayList<ExameFisico>();
        }
    }
    
    public ExameFisico retornarExamePeloId(ExameFisico exame){
        return getEntityManager().find(ExameFisico.class, exame.getIdExameFisico());
    }
    
    public void salvar(ExameFisico exame){
        save(exame);
    }
    
    public void deletar(ExameFisico exame){
        try{
            delete(exame);
        }catch (Exception ex){
            ex.printStackTrace();
        }
    }
    
    public void atualizar(ExameFisico exame){
        update(exame);
    }
    
    
}



